using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NTTHAO.Web.BL.CommonPage;
using NTTHAO.Common;
using NTTHAO.CommonWeb;

public partial class admin_webparts_Plug_ins_CommonPage_CommonAlbumContent : System.Web.UI.UserControl
{
    public CommonAlbum _Album = null;
    public DataTable _ImageList = null;

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            try
            {
                int albumID = Int32.Parse(Request.QueryString["id"]);
                CommonAlbum album = new CommonAlbum(albumID);
                if (album.ID > 0)
                {
                    _Album = album;

                    CommonImage detail = new CommonImage();
                    DataSet ds = detail.GetAll(_Album.ID);

                    if (ds != null && ds.Tables.Count > 0)
                    {
                        _ImageList = ds.Tables[0];
                    }
                }
            }
            catch (Exception)
            {

            }
        }
    }

    public string GetMiniImage(string imagePath, string imageName)
    {
        return (imagePath + "Mini_" + System.IO.Path.ChangeExtension(imageName, ".jpg"));
    }
}
